<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js"></script>
</head>
<body>

    <div id="root">

        <div v-show="bool">
            zs
        </div>
        <button v-on:click="changediv">隐藏和显示</button>
    </div>
    <script>
        new Vue({
            el: "#root",
            data: {
                bool: false
            },
            methods: {
                changediv: function () {
                    this.bool = !this.bool
                }
            }
        })
    </script>

</body>
</html>
